/**
 * Copyright &copy; 2015-2020 <a href="http://后台管理系统/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.mapper;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.jeeplus.core.persistence.BaseMapper;
import com.jeeplus.core.persistence.annotation.MyBatisMapper;
import com.jeeplus.modules.web.entity.YjCommand;

/**
 * 命令MAPPER接口
 * 
 * @author rongjie
 * @version 2017-07-31
 */
@MyBatisMapper
public interface YjCommandMapper extends BaseMapper<YjCommand> {
	/**
	 * 
	 * @author ljl
	 * @data 2018年3月21日
	 * @description 查询在线的设备
	 * @param s
	 * @param mac
	 * @return
	 */
	@Select("select * from yj_command where type=0 and equipment=#{mac} order by id asc limit 1")
	YjCommand getType(@Param("s") String s, @Param("mac") String mac);

	@Update("update yj_command set type=1 where id=#{id}")
	void setType(String id);
}